package com.jumper.study.db.dao;

import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jumper.study.db.dto.DateCountDto;
import com.jumper.study.db.dto.OrderDto;
import com.jumper.study.db.dto.OrderSearchDto;
import com.jumper.study.db.model.Order;

public interface OrderMapper extends BaseMapper<Order> {
    //订单搜索
    IPage<OrderDto> pageSearchWithAccountAndLesson(IPage<OrderDto> page, OrderSearchDto search);

    //订单搜索
    IPage<OrderDto> pageSearchWithLesson(IPage<OrderDto> page, OrderSearchDto search);

    //读取订单
    OrderDto getWithAccountAndLesson(Long id);

    /**
     * 统计订单数据
     * @param start
     * @param end
     * @return
     */
    List<DateCountDto> selectDateCount(LocalDateTime start, LocalDateTime end);
}
